package org.lboot.idmo.app.router.params;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author kindear
 * 路由新建参数
 */
@Data
@ApiModel(value = "路由更新参数")
public class AppRouteUpdateParams {

    @NotNull(message = "路由记录ID不可为空")
    @ApiModelProperty(value = "路由记录ID")
    Long id;

    @NotBlank(message = "路由不可为空")
    @ApiModelProperty(value = "路由(支持正则)")
    String route;

    @NotEmpty(message = "支持方法列表不可为空")
    @ApiModelProperty(value = "支持方法")
    List<String> methods;

    @Min(value = 0,message = "优先级不可为空且大于1")
    @ApiModelProperty(value = "优先级")
    Integer priority;
}
